; -*-Scheme-*-

;************************************************************************/
;*                                                                      */
;* Copyright (c) 2003-2009 Vladimir Tsichevski <tsichevski@gmail.com>   */
;*                                                                      */
;* This file is part of bigloo-lib (http://bigloo-lib.sourceforge.net)  */
;*                                                                      */
;* This library is free software; you can redistribute it and/or        */
;* modify it under the terms of the GNU Lesser General Public           */
;* License as published by the Free Software Foundation; either         */
;* version 2 of the License, or (at your option) any later version.     */
;*                                                                      */
;* This library is distributed in the hope that it will be useful,      */
;* but WITHOUT ANY WARRANTY; without even the implied warranty of       */
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    */
;* Lesser General Public License for more details.                      */
;*                                                                      */
;* You should have received a copy of the GNU Lesser General Public     */
;* License along with this library; if not, write to the Free Software  */
;* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 */
;* USA                                                                  */
;*                                                                      */
;************************************************************************/

(module
 xsltutils
;  (library common) ;; for string* support
;  (include "common.sch")
 (import xmlregexp xtree xpath xparser xslt xmlio encoding)
 (extern
;   (include "libxml/tree.h")
;   (include "libxml/parser.h")
;   (include "libxslt/xslt.h")
;   (include "libxslt/xsltInternals.h")
;   (include "libxslt/transform.h")
  (include "libxslt/xsltutils.h")
;  (include "libxslt/extensions.h")
;;  (include "libxslt/security.h")

;  (include "libexslt/exsltconfig.h")
 ))

;; xsltSaveResultTo:
;; @buf:  an output buffer
;; @result:  the result xml-doc
;; @style:  the stylesheet

;; Save the result @result obtained by applying the @style stylesheet
;; to an I/O output channel @buf

;; Returns the number of byte written or -1 in case of failure.
(define-func xsltSaveResultTo int ((xml-output-buffer buf)
				   (xml-doc result)
				   (xslt-stylesheet style)))

